/*
 * @Author: your name
 * @Date: 2021-12-23 00:18:18
 * @LastEditTime: 2021-12-23 00:26:28
 * @LastEditors: Please set LastEditors
 * @Description: 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 * @FilePath: \Flutter_Learning\Dart_Basic_Grammer\operation_condition_typeExchange.dart
 */



void main(List<String> args) {
    /**
     * 运算符一致
     */
    int a = 2;
    int b = 3;

    print(a + b);
    print(a * b);
    print(a * b + a);

    print(a == b);
    
    // 赋值运算
    int c;
    c = a + b;


    // 三目运算符
    var flag = true;
    String cc = flag?"True":"False";



    /**
     * 类型转换
     * 和转换失败的 try 。。。 catch
     */

    String str = '123';
    var empty = str.isEmpty;
    try {
        var myNum = int.parse(str);
        print(myNum);

    } catch(err) {
        print(0);
    }
    

    var num = 23;
    var sss = num.toString();




}